<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:p="http://primefaces.org/ui">

<ui:composition template="/pages/home.xhtml">
	<ui:define name="conteudo">
		<p:tabMenu activeIndex="2">
			<p:menuitem value="Empréstimo" url="emprestimo.jsf" />
			<p:menuitem value="Leitor" url="leitor.jsf" />
			<p:menuitem value="Livro" url="livro.jsf" />
			<p:menuitem value="Autor" url="autor.jsf" />
			<p:menuitem value="Editora" url="editora.jsf" />
			<p:menuitem value="Classificação" url="classificacao.jsf" />
		</p:tabMenu>
		<h:form>
			<h:panelGrid columns="2" cellpadding="4">
				<h:outputLabel value="Autor" />
				<p:selectOneMenu id="autor" value="#{MBAutorLivro.beanAutorLivro.autor}" panelStyle="width:250px"
					effect="drop" style="width:160px" filter="true"
					filterMatchMode="startsWith" converter="converterAutor">
					<f:selectItem itemLabel="---" itemValue="" />
					<f:selectItems value="#{MBAutor.listarA}" var="autor"
						itemLabel="#{autor.autNome}" itemValue="#{autor.autId}" />
				</p:selectOneMenu>
			</h:panelGrid>
			<p:commandButton value="Salvar" action="#{MBLivro.salvar()}" />
			<p:commandButton value="Cancelar" action="livro" />
		</h:form>
	</ui:define>
</ui:composition>
</html>